{% extends "pedidos/base.html" %}
{% load i18n %}
{{form.media}}
{% load adminmedia %}
{% block extrahead %}
<script type="text/javascript">
window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
</script>

<script type="text/javascript" src="/admin/jsi18n/"></script> 

<script type="text/javascript" src="/static/django/js/core.js"></script>
<script type="text/javascript" src="/static/django/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/static/django/js/calendar.js"></script>
<script type="text/javascript" src="/static/django/js/admin/DateTimeShortcuts.js"></script>
<link rel="stylesheet" type="text/css" href="/static/django/css/forms.css"/>
<link rel="stylesheet" type="text/css" href="/static/django/css/base.css"/>
<link rel="stylesheet" type="text/css" href="/static/django/css/widgets.css"/>
{% endblock %}
{%block content%}


<div id="tab">
	<form method="POST" enctype="multipart/form-data">
		{% csrf_token %}
		<div id="pedidos">
			<h1><center>Pedido de Galvanizado de Piezas</center></h1>
			
			<table>
				{% for field in form %}
					{% if field.label == '* Plazo de entrega' or field.label == '* Fecha' %}
						<tr>
						<td>
							{{ field.errors }}
							{{ field.label }}
							{{ field }}
						</td>
						</tr>
					{% else %}
						{% if field.label == 'Nombre' %}
						{% else %}
							<tr>
							<td>
								{{ field.errors }}
								{{ field.label }}
								{{ field }}
							</td>
							</tr>
						{% endif %}
					{% endif %}
				{% endfor %}
			</table>
		</div>
		
		<input type="submit" class="find_link" value="Guardar" />
		<!-- <input type="button" class="find_link" value="Cancelar" onclick="location.href='/wal/pedidos/listar/ot=asc&o=3&page=1'"/> -->
		
	</form>
	<form action="javascript: history.go(-1)">
		<input type="submit" class="find_link" value="Cancelar" />
	</form>
</div>

{%endblock%}

<script type="text/javascript" >
    
    $("#id_fecha").datepicker({showAnim: 'slide',
                                                changeMonth: true,
                                                changeYear: true,
                                                dateFormat: 'yy-mm-dd'});
    $("#id_plazo").datepicker({showAnim: 'slide',
                                                changeMonth: true,
                                                changeYear: true,
                                                dateFormat: 'yy-mm-dd'});
</script>
